package com.example.lots_of_demo.utils;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.util.ArrayList;
import java.util.List;

/**
 * @author : LZJ
 * @description : code for LZJ
 * @date : 2021/2/15
 */
@Component
public class ReleasePassUtils {

    /**
     * 登录
     */
    private static final String LOGIN = "/user/login";
    /**
     * 注册
     */
    private static final String REGISTER = "/user/register";

    /**
     * 放行 List集合
     */
    private List<String> releasePassList = new ArrayList<>();

    @PostConstruct
    public void inti(){
        releasePassList.add(LOGIN);
        releasePassList.add(REGISTER);
    }

    public boolean isIncludeReleasePassList(String url){
        return releasePassList.contains(url);
    }

}
